<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/taglib.jsp" %>

<s:layout-definition>

    <!DOCTYPE html>
    <html>
    <head>
        <title>${title} - ${subtitle}</title>
        <meta http-equiv="pragma" content="no-cache" />
        <meta http-equiv="expires" content="-1" />
        <s:url var="defaultCss" value="/resources/default.css"/>
        <link rel="stylesheet" type="text/css" href="${defaultCss}"/>
        <s:url var="jqueryJs" value="/resources/jquery-1.4.2.min.js"/>
        <script type="text/javascript" src="${jqueryJs}"></script>
        <s:url var="jqueryFlotJs" value="/resources/jquery.flot.js"/>
        <script type="text/javascript" src="${jqueryFlotJs}"></script>

        <s:url var="excanvasJs" value="/resources/excanvas.min.js"/>
        <!--[if IE]><script language="javascript" type="text/javascript" src="${excanvasJs}"></script><![endif]-->

        <s:layout-component name="head"/>

        <script type="text/javascript">
        </script>
    </head>
    <body>
    <table class="layout" cellspacing="0px">
        <tr>
            <td width="10%" style="background-color: #D3D3D3; border-right: 1px solid #AAAAAA;">

            </td>
            <td width="80%">

                <!-- CENTER COLUMN -->
                <table class="layout" width="100%" cellspacing="0px">
                    <tr>
                        <td>
                            <div class="header">
                                <span class="headerRight"></span>
                                <s:link href="index.html">
                                    <span class="headerLeft"></span>
                                </s:link>
                            </div>
                            <div class="headerShaddow"></div>
                            <div class="body">
                                <sec:authorize access="isAuthenticated()">
                                    <div style="text-align: right;">
                                        <s:link title="Home" href="Home.action"><img style="padding-right:10px;" src="resources/home.png" border="0"/></s:link>
                                        <sec:authorize access="hasRole('ROLE_ADMIN')">
                                            <s:link title="Add New Job" href="AddNewJob.action"><img style="padding-right:10px;" src="resources/new.gif" border="0"/></s:link>
                                            <s:link title="Add New Host" href="AddNewHost.action"><img style="padding-right:10px;" src="resources/add_host.png" border="0"/></s:link>
                                        </sec:authorize>
                                        <s:link title="Hosts" href="InfoHosts.action"><img style="padding-right:10px;" src="resources/host.png" border="0"/></s:link>
                                        <s:link title="Settings" href="InfoSettings.action"><img style="padding-right:10px;" src="resources/settings.png" border="0"/></s:link>
                                        <s:link title="Audit" href="InfoAuditLog.action"><img style="padding-right:10px;" src="resources/settings.png" border="0"/></s:link>
                                        <sec:authorize access="hasRole('ROLE_ADMIN')">
                                            <s:link title="Stop All" href="StopAll.action"><img style="padding-right:10px;" src="resources/warning.png" border="0"/></s:link>
                                        </sec:authorize>
                                        <s:link title="Users" href="InfoUsers.action"><img style="padding-right:10px;" src="resources/user.png" border="0"/></s:link>
                                        <s:link title="Logout" href="j_spring_security_logout"><img src="resources/logout.png" border="0"/></s:link>
                                        <br/><br/>
                                        <span class="small_light" style="font-size: 9px; color: #a9a9a9">Logged in as <a href="Profile.action">${actionBean.loggedInUser.fullName}</a></span>
                                    </div>
                                </sec:authorize>
                                <s:layout-component name="body"/>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="copy">
                            <c:if test="${actionBean.worldClock != ''}">
                            <sec:authorize access="isAuthenticated()">
                                <div style="text-align: center; padding-bottom: 10px">World Clock:<br/>
                                <c:forEach items="${actionBean.worldClock}" var="entry" varStatus="loop">
                                ${entry} <c:if test="${!loop.last}"> | </c:if>
                                </c:forEach>
                                </div>
                            </sec:authorize>
                            </c:if>
                        Global Cron <a href="release_notes.jsp"><%=session.getServletContext().getAttribute("version")%></a> &copy Rupert Jones 2011,2012 - <a href="http://opensource.org/licenses/gpl-3.0.html">license</a> - started at <%=session.getServletContext().getAttribute("started")%>
                        </td>
                    </tr>
                </table>

            </td>
            <td width="10%" style="background-color: #D3D3D3; border-left: 1px solid #AAAAAA;">
                      &nbsp;
            </td>
        </tr>
    </table>
    </body>
    </html>

</s:layout-definition>
